package de.szut.events;

import java.util.Collection;
import java.util.EventObject;
import java.util.HashMap;

	/**
	 * Implementation of HashMap to hold events.
	 * <b>Not</b> threadsafe!
	 * Events are <b>not</b> fired in order!
	 * @author Marc Huisinga
	 *
	 * @param <K> - Key of the event
	 * @param <T> - Type of the event
	 */
public class EventHashMap<K,T extends Event> extends HashMap<K,T> implements FireableCollection {

	private static final long serialVersionUID = -5510283473685783094L;

	@Override
	public void fireAll(EventObject e) {
		new EventCannoneer<Collection<T>>(values()).fire(e);
	}

}
